package com.train.mgr.modules.system.dto.request;

import com.train.mgr.modules.system.dto.request.groups.Insert;
import com.train.mgr.modules.system.dto.request.groups.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class DeptReqDTO {

    /** 部门ID */
    @ApiModelProperty(name = "deptId", value = "组织ID，编辑不能为空，新增必须为空")
    @NotNull(message = "部门ID必填", groups = {Update.class})
    private Long deptId;

    /** 父部门ID */
    @ApiModelProperty(name = "parentId", value = "父组织ID，新增/编辑不能为空",required = true)
    @NotNull(message = "父组织ID必填", groups = {Update.class})
    private Long parentId;

    /** 部门名称 */
    @ApiModelProperty(name = "deptName", value = "组织名称，新增/编辑不能为空",required = true)
    @NotBlank(message = "组织名称必填", groups = {Insert.class, Update.class})
    private String deptName;

    @ApiModelProperty(name = "status", value = "组织状态（1-禁止，0-正常），新增/编辑不能为空",required = true)
    @NotBlank(message = "组织状态必填", groups = {Insert.class, Update.class})
    private String status;

    /** 显示顺序 */
    @ApiModelProperty(name = "orderNum", value = "组织排序值")
    private Integer orderNum;


}
